// ignore_for_file: unused_local_variable

import 'dart:math';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_app/main02.dart';
import 'package:flutter_app/main26.dart';
import 'res/listData.dart';
import 'pages/Tabs.dart';
import 'routes/routes.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Flutter_Demo"),
        ),
        body: LayoutDemo(),
      ),
    );
  }
}

class LayoutDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 600,
      width: 300,
      color: Colors.black54,
      padding: EdgeInsets.all(10),
      child: Wrap(
        spacing: 10,
        runSpacing: 10,
        direction: Axis.vertical,

        // alignment: WrapAlignment.spaceAround,
        // runAlignment: WrapAlignment.start,
        children: [
          MyButton("第一季"),
          MyButton("第一季"),
          MyButton("第一季"),
          MyButton("第一季"),
          MyButton("第一季"),
          MyButton("第一季"),
          MyButton("第一季"),
          MyButton("第一季"),
          MyButton("第一季"),
          MyButton("第一季"),
          MyButton("第一季")
        ],
      ),
    );
  }
}

class MyButton extends StatelessWidget {
  final String text;

  const MyButton(this.text, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ElevatedButton(
      onPressed: () {},
      child: Text(this.text),
    );
  }
}
